package com.victor.zjbj_android;

import android.Manifest;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import com.victor.zjbj_android.base.BaseActivity;
import com.victor.zjbj_android.daichuli.DaiChuliActivity;
import com.victor.zjbj_android.mod.zhongxin.CenterActivity;
import com.victor.zjbj_android.yichuli.YichuliActivity;
import com.victor.zjbj_android.yinhuan.YinHuanTiJiaoActivity;
import com.victor.zjbj_android.zuoye.ZuoYeActivity;
import com.yanzhenjie.permission.AndPermission;

public class MainActivity extends BaseActivity {



    @Override
    protected int getResourcesId() {
        return R.layout.activity_main;
    }

    @Override
    protected void init(Bundle savedInstanceState) {
        AndPermission.with(this).requestCode(100).permission(Manifest.permission.CAMERA).start();
        AndPermission.with(this).requestCode(100).permission(Manifest.permission.WRITE_EXTERNAL_STORAGE).start();
        findViewById(R.id.iv_login).setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {
                startActivity(new Intent(MainActivity.this, CenterActivity.class));
            }
        });
        findViewById(R.id.rl_yhtj).setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {
                startActivity(new Intent(MainActivity.this, YinHuanTiJiaoActivity.class));
            }
        });
        findViewById(R.id.rl_daichuli).setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {
                startActivity(new Intent(MainActivity.this, DaiChuliActivity.class));
            }
        });
        findViewById(R.id.rl_yichuli).setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {
                startActivity(new Intent(MainActivity.this, YichuliActivity.class));
            }
        });
        findViewById(R.id.rl_zuoye).setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {
                startActivity(new Intent(MainActivity.this,ZuoYeActivity.class));
            }
        });
    }

}
